package com.zte.north.chktool.actions;

import java.util.ArrayList;
import java.util.HashMap;

import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.widgets.Shell;

import com.zte.north.chktool.objects.ViewChkObj;
import com.zte.north.factories.ConsoleFactory;
import com.zte.north.utils.CommonUtil;

public class ExportDbViewRstAction extends SelectionAdapter {

	private Shell shell;
	private HashMap<String,ArrayList<ViewChkObj>> resulths = 
			new HashMap<String,ArrayList<ViewChkObj>>();
	private int mode = 0;

	public ExportDbViewRstAction(Shell shell,
			HashMap<String,ArrayList<ViewChkObj>> resulths, int mode) {
		this.shell = shell;
		this.resulths = resulths;
		this.mode = mode;
	}

	public void widgetSelected(SelectionEvent e) {
		ConsoleFactory.showConsole();
		CommonUtil.getInstance().selectBatchChkViewReportPath(shell, "summary",
				resulths, mode);
	}

}
